<!DOCTYPE html>
<html>
<head lang="en">
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <#import "/spring.ftl" as spring>
    <title><@spring.message code="login.tip"/></title>
    <link rel="shortcut icon" href="${request.contextPath}/favicon.ico" type="image/x-icon" />
    <link href="${request.contextPath}/zhny/css/reset.css" rel="stylesheet" type="text/css">
    <link href="${request.contextPath}/zhny/css/zhuanJiaWenDa.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" src="${request.contextPath}/zhny/js/echarts.js"></script>

    <script src="${request.contextPath}/zhny/js/jquery.min.js"></script>
    <!--字体缩放js-->
    <script src="${request.contextPath}/zhny/js/js-style.js"></script>
    <!--end字体缩放js-->
    <!--动态特效-->
    <link href="${request.contextPath}/zhny/css/style.css" rel="stylesheet" type="text/css" />

</head>
<body >


<!--top-->

<header class="header">
    <div class="header_box clearfix">
        <div class="header_box_l">
            <p>hello,${user.username!""}，<@spring.message code="index.wel"/></p>
        </div>
        <div class="header_box_c">
            <div class="masked"><@spring.message code="login.tip"/></div>
        </div>
        <div class="header_box_r ">
            <a href="${request.contextPath}/sy/zjwd/zjwdnew.html?locale=zh_CN" target="_self">中文版</a>
            <a href="${request.contextPath}/sy/zjwd/zjwdnew.html?locale=en_US" target="_self">English</a>
            <a href="${request.contextPath}/sy/logout" target="_self"><@spring.message code="index.out"/></a>
        </div>
    </div>
</header>
<!--end top-->

<div class="comment clearfix">
    <!--左侧-->
    <div class="comment_l">
        <div class="comment_l_up ">
            <h3><@spring.message code="zjwd.nyzjz"/></h3>
            <div class="jiao_1">
                <img src="${request.contextPath}/zhny/images/1.gif">
            </div>
        </div>
        <div class="comment_l_down">
            <ul>
                <#list zjxx as zjxx>
                <li class="clearfix">
                    <div class="header_img">
                        <!--background: url("../images/zj_1.png") no-repeat center ;-->
                        <img src="${zjxx.zjtp}" alt="" style="background: no-repeat center;width: 100%;height: 100%" onerror="this.src='http://47.106.191.129/${zjxx.zjtp}'">
                        <!--<img src="${request.contextPath}/zhny/images/new_03.jpg" alt="">-->
                    </div>
                    <div class="jieShao">
                        <h5>${zjxx.zjname}</h5>
                        <span>${zjxx.zjintroduction}</span>
                    </div>
                </li>
                </#list>


            </ul>
        </div>
    </div>
    <!--中间-->
    <div class="comment_c">
        <div class="comment_c_box">
            <div class="up_title">
                <h4><@spring.message code="zjwd.wtlx"/></h4>
            </div>

            <div class="up_box">
                <div id="main1" style="width: 100%;height: 100%">
                    <script type="text/javascript">
                        /*-----------------------------main-----------------------------*/
                        var myChart1 = echarts.init(document.getElementById('main1'));
                        // 指定图表的配置项和数据


                        var plantCap = [{
                            name: '病虫害问题',
                            value: '154'
                        }, {
                            name: '收割问题',
                            value: '115'
                        }, {
                            name: '降低自然灾害影响',
                            value: '123'
                        }, {
                            name: '化肥',
                            value: '95'
                        }, {
                            name: '土壤',
                            value: '92'
                        }, {
                            name: '气候',
                            value: '87'
                        }, {
                            name: '育苗',
                            value: '60'
                        }, {
                            name: '提高产量',
                            value: '60'
                        }];

                        var datalist = [{
                            offset: [56, 48],
                            symbolSize: 154,
                            opacity: .95,
                            color: 'rgba(0,123,201, 1)'
                        },  {
                            offset: [20, 43],
                            symbolSize: 115,
                            opacity: .84,
                            color: 'rgba(0,123,201, 0.95)'
                        }, {
                            offset: [83, 35],
                            symbolSize: 113,
                            opacity: .8,
                            color: 'rgba(0,123,201,0.95)'
                        }, {
                            offset: [36, 30],
                            symbolSize: 95,
                            opacity: .75,
                            color: 'rgba(0,123,201, 0.90)'
                        }, {
                            offset: [64, 20],
                            symbolSize: 92,
                            opacity: .7,
                            color: 'rgba(0,123,201, 0.90)'
                        }, {
                            offset: [35, 45],
                            symbolSize: 87,
                            opacity: .68,
                            color: 'rgba(0,123,201, 0.85)'
                        }, {
                            offset: [80, 52],
                            symbolSize: 60,
                            opacity: .7,
                            color: 'rgba(0,123,201, 0.80)'
                        },{
                            offset: [40, 65],
                            symbolSize: 60,
                            opacity: .88,
                            color: 'rgba(0,123,201, 0.95)'
                        }];
                        var datas = [];
                        for (var i = 0; i < plantCap.length; i++) {
                            var item = plantCap[i];
                            var itemToStyle = datalist[i];
                            datas.push({
                                name: item.value + '\n' + item.name,
                                value: itemToStyle.offset,
                                symbolSize: itemToStyle.symbolSize,
                                label: {
                                    normal: {
                                        textStyle: {
                                            fontSize: 14,
                                            color:'#fff'
                                        }
                                    }
                                },
                                itemStyle: {
                                    normal: {
                                        color: itemToStyle.color,
                                        opacity: itemToStyle.opacity
                                    }
                                },
                            })
                        }
                        option = {
                            grid: {
                                show: false,
                                top: 10,
                                bottom: 10
                            },
                            xAxis: [{
                                gridIndex: 0,
                                type: 'value',
                                show: false,
                                min: 0,
                                max: 100,
                                nameLocation: 'middle',
                                nameGap: 5
                            }],
                            yAxis: [{
                                gridIndex: 0,
                                min: 0,
                                show: false,
                                max: 100,
                                nameLocation: 'middle',
                                nameGap: 30
                            }],
                            series: [{
                                type: 'scatter',
                                symbol: 'circle',
                                symbolSize: 120,
                                label: {
                                    normal: {
                                        show: true,
                                        formatter: '{b}',
                                        color: '#fff',
                                        textStyle: {
                                            fontSize: '20'
                                        }
                                    },
                                },
                                itemStyle: {
                                    normal: {
                                        borderWidth: '1',
                                        borderType: 'solid',
                                        borderColor: '#fff',
                                        color: '#0ea0ff',
                                        shadowColor: '#0ea0ff',
                                        shadowBlur: 10
                                    }
                                },
                                data: datas
                            }]
                        };





                        myChart1.setOption(option);
                    </script>
                </div>
            </div>
        </div>
        <div class="comment_c_box" style="margin-top: 2%">
            <div class="up_title">
                <h4><@spring.message code="zjwd.wtmyd"/></h4>
            </div>
            <div class="up_box">
                <div id="main2" style="width: 100%;height: 100%">
                    <script type="text/javascript">
                        /*-----------------------------main-----------------------------*/
                        var myChart2 = echarts.init(document.getElementById('main2'));
                        // 指定图表的配置项和数据
                        option = {

                            tooltip: {},
                            grid: {
                                top: '15%',
                                left: '1%',
                                right: '1%',
                                bottom: '5%',
                                containLabel: true,
                            },
                            legend: {
                                itemGap: 50,
                                data: ['问题总数' ,'已回复'],
                                textStyle: {
                                    color: '#f9f9f9',
                                    borderColor: '#fff'
                                },
                            },
                            xAxis: [{
                                type: 'category',
                                boundaryGap: true,
                                axisLine: { //坐标轴轴线相关设置。数学上的x轴
                                    show: true,
                                    lineStyle: {
                                        color: '#f9f9f9'
                                    },
                                },
                                axisLabel: { //坐标轴刻度标签的相关设置
                                    textStyle: {
                                        color: '#d1e6eb',
                                        margin: 15,
                                    },
                                },
                                axisTick: {
                                    show: false,
                                },
                                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', ],
                            }],
                            yAxis: [{
                                type: 'value',
                                min: 0,
                                // max: 140,
                                splitNumber: 7,
                                splitLine: {
                                    show: true,
                                    lineStyle: {
                                        color: '#0a3256'
                                    }
                                },
                                axisLine: {
                                    show: false,
                                },
                                axisLabel: {
                                    margin: 20,
                                    textStyle: {
                                        color: '#d1e6eb',

                                    },
                                },
                                axisTick: {
                                    show: false,
                                },
                            }],
                            series: [{
                                name: '问题总数',
                                type: 'line',
                                // smooth: true, //是否平滑曲线显示
                                // 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
                                showAllSymbol: true,
                                symbol: 'emptyCircle',
                                symbolSize: 6,
                                lineStyle: {
                                    normal: {
                                        color: "#28ffb3", // 线条颜色
                                    },
                                    borderColor: '#f0f'
                                },
                                label: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        color: '#fff',
                                    }
                                },
                                itemStyle: {
                                    normal: {
                                        color: "#28ffb3",

                                    }
                                },
                                tooltip: {
                                    show: false
                                },
                                areaStyle: { //区域填充样式
                                    normal: {
                                        //线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
                                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                            offset: 0,
                                            color: 'rgba(0,154,120,1)'
                                        },
                                            {
                                                offset: 1,
                                                color: 'rgba(0,0,0, 0)'
                                            }
                                        ], false),
                                        shadowColor: 'rgba(53,142,215, 0.9)', //阴影颜色
                                        shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
                                    }
                                },
                                data: [37, 52, 49, 39, 49, 57, 67]
                            }, {
                                name: '已回复',
                                type: 'bar',
                                barWidth: 20,
                                tooltip: {
                                    show: false
                                },
                                label: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        color: '#fff',
                                    }
                                },
                                itemStyle: {
                                    normal: {
                                        // barBorderRadius: 5,
                                        // color: new echarts.graphic.LinearGradient(
                                        //     0, 0, 0, 1,
                                        //     [{
                                        //             offset: 0,
                                        //             color: '#14c8d4'
                                        //         },
                                        //         {
                                        //             offset: 1,
                                        //             color: '#43eec6'
                                        //         }
                                        //     ]
                                        // )
                                        color: function(params) {
                                            var colorList = ['#0ec1ff', '#10cdff', '#12daff', '#15ebff', '#17f8ff', '#1cfffb', '#1dfff1'];
                                            return colorList[params.dataIndex];
                                        }
                                    }
                                },
                                data: [30, 42, 32, 24, 43, 45, 46]
                            }]
                        };





                        myChart2.setOption(option);
                        window.onresize = function() {

                            myChart1.resize();
                            myChart2.resize();

                        }
                    </script>
                </div>
            </div>
        </div>

    </div>
    <!--右侧-->

    <div class="comment_r">
        <div class="up_title clearfix">
            <h4><@spring.message code="zjwd.jied"/></h4>
            <div class="jiao_1">
                <img src="${request.contextPath}/zhny/images/1.gif">
            </div>
        </div>
        <div class="comment_r_list">
            <ul>
                <#list zjwd as wds>
                <li onclick="zjwdxq('${wds.id}');">
                    <div class="li_title clearfix">
                        <h4><strong>游客问：</strong>${wds.wttitle}</h4>
                        <span>${wds.createtime?string("yyyy-MM-dd")}</span>
                    </div>
                    <div class="jieDa">
                        <p>${wds.zjanswer}</p>
                        <span>回复专家：${wds.zjname}</span>
                    </div>
                </li>
                </#list>
                <!--<li>
                    <div class="li_title clearfix">
                        <h4><strong>home问：</strong>如何增加水稻产量?</h4>
                        <span>2018-09-13</span>
                    </div>
                    <div class="jieDa">
                        <p>以虫治虫，采取生物防治的方法可以有效杀灭害虫，利用害虫的天敌来进行防治应该不会造成危害，再说还可以利用家禽例如家鸭，家鸡也能达到效果</p>
                        <span>回复专家：王金伟</span>
                    </div>
                </li>
                <li>
                    <div class="li_title clearfix">
                        <h4><strong>home问：</strong>如何增加水稻产量?</h4>
                        <span>2018-09-13</span>
                    </div>
                    <div class="jieDa">
                        <p>以虫治虫，采取生物防治的方法可以有效杀灭害虫，利用害虫的天敌来进行防治应该不会造成危害，再说还可以利用家禽例如家鸭，家鸡也能达到效果</p>
                        <span>回复专家：王金伟</span>
                    </div>
                </li>
                <li>
                    <div class="li_title clearfix">
                        <h4><strong>home问：</strong>如何增加水稻产量?</h4>
                        <span>2018-09-13</span>
                    </div>
                    <div class="jieDa">
                        <p>以虫治虫，采取生物防治的方法可以有效杀灭害虫，利用害虫的天敌来进行防治应该不会造成危害，再说还可以利用家禽例如家鸭，家鸡也能达到效果</p>
                        <span>回复专家：王金伟</span>
                    </div>
                </li>-->

            </ul>
             <!--<a class="btn_a"><@spring.message code="zjwd.syy"/></a> <a class="btn_a"><@spring.message code="zjwd.xyy"/></a>-->

        </div>
    </div>



</div>
<!--nav-->
<div class="container">
    <section>
        <!--<button  onclick="window.location.href='${request.contextPath}/sy/index/indexnew.html'"  class="btn btn-green btn-border-o">首页</button>
        <button onclick="window.location.href='${request.contextPath}/sy/nydsj/nydsjnew.html'" class="btn btn-blue btn-border-o">数据检测</button>
        <button onclick="window.location.href='${request.contextPath}/sy/zlzs/zlzsnew.html'" class="btn btn-purple btn-border-o">质量追溯</button>
        <button onclick="window.location.href='${request.contextPath}/sy/zjwd/zjwdnew.html'" class="btn btn-red  btn-border-o  active4">专家指导</button>
        <button onclick="window.location.href='${request.contextPath}/sy/nybk/nybknew.html'" class="btn btn-orange btn-border-o">农业百科</button>
-->
        <#if isAdmn == "TRUE">
        <button  onclick="shouye()"  class="btn btn-green btn-border-o "><@spring.message code="index.sy"/></button>
    </#if>
    <button onclick="nydsj()" class="btn btn-blue btn-border-o"><@spring.message code="index.sjjc"/></button>
    <button onclick="zlzs()" class="btn btn-purple btn-border-o "><@spring.message code="index.zlzs"/></button>
    <button onclick="zjzd()" class="btn btn-red  btn-border-o active4"><@spring.message code="index.zjzd"/></button>
    <button onclick="nybk()" class="btn btn-orange btn-border-o "><@spring.message code="index.nybk"/></button>
    </section>
</div>
<script type="text/javascript">

    $(".title").css("line-height",$(".title").height() + 'px')
    $(window).resize(function(){
        $(".title").css("line-height",$(".title").height() + 'px')
    })
    var locale="";
    window.onload = function(){
        var req = new XMLHttpRequest();
        req.open('GET', document.location, false);
        req.send(null);
        var headers = req.getAllResponseHeaders();
        locale=req.getResponseHeader('content-language');
        if(locale=="en-US"){
            locale="en_US";
        }else{
            locale="zh_CN";
        }
    }

    function zlzs(){
        window.location.href="${request.contextPath}/sy/zlzs/zlzsnew.html?locale="+locale;
    }
    function shouye(){
        window.location.href="${request.contextPath}/sy/index/indexnew.html?locale="+locale;
    }
    function zjzd(){
        window.location.href="${request.contextPath}/sy/zjwd/zjwdnew.html?locale="+locale;
    }
    function nybk(){
        window.location.href="${request.contextPath}/sy/nybk/nybknew.html?locale="+locale;
    }
    function nydsj(){
        window.location.href="${request.contextPath}/sy/nydsj/nydsjnew.html?locale="+locale;
    }

   /* function nydsj(address) {
        location.href = '${request.contextPath}/sy/nydsj/nydsjnew.html?address='+address+"&locale="+locale;
    }
*/

</script>
<script type="text/javascript">
    function zjwdxq(id) {
        //var ids = $("#spid").val();
        //alert(ids);
        window.location.href = "${request.contextPath}/sy/zjwd/zjwdxq.html?id=" + id+"&locale="+locale;
    }
</script>

</body>
</html>
